import $http from "@/public/utils/http";
import $https from "@/public/utils/https";

//应用授权
export const Authenticate = (data) =>
  $http.post("/api/TokenAuth/Authenticate", data);

//货主注册
export const ShiperReg = (data) =>
  $http.post("/api/services/app/ShengYunHui/ShiperReg", data);

//司机注册
export const DriverReg = (data) =>
  $http.post("/api/services/app/ShengYunHui/DriverReg", data);

//获取运单列表
export const GetWaybillList = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetWaybillList", data);

//获取用户详情
export const GetUserById = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetUserById", data);

//用户信息修改
export const UserInfoUpdate = (data) =>
  $http.post("/api/services/app/ShengYunHui/UserInfoUpdate", data);

//验证码发送
export const SendVeriCode = (data) =>
  $http.post("/api/services/app/ShengYunHui/SendVeriCode", data);

//图片上传
export const UploadOSS = (data) => $http.post("/api/UploadOSS", data);

//获取字典列表
export const GetDics = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetDics", data);

//发布货源
export const WayBillCreate = (data) =>
  $http.post("/api/services/app/ShengYunHui/WayBillCreate", data);

//获取运单详情
export const GetWayBillDetail = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetWayBillDetail", data);

//运单报价
export const WayBillOffer = (data) =>
  $http.post("/api/services/app/ShengYunHui/WayBillOffer", data);

//确认运单
export const WayBillConfirm = (data) =>
  $http.post("/api/services/app/ShengYunHui/WayBillConfirm", data);

//获取最新报价
export const GetNewWayBill = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetNewWayBill", data);

//获取报价列表
export const GetOfferList = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetOfferList", data);

//确认报价
export const OfferConfirm = (data) =>
  $http.post("/api/services/app/ShengYunHui/OfferConfirm", data);

//获取报价详情
export const GetOfferDetail = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetOfferDetail", data);

//货主取消运单
export const WayBillCancel = (data) =>
  $http.post("/api/services/app/ShengYunHui/WayBillCancel", data);

//货主确认收货
export const WayBillReceipt = (data) =>
  $http.post("/api/services/app/ShengYunHui/WayBillReceipt", data);

//更改运输状态
export const TranStatusUpdate = (data) =>
  $http.post("/api/services/app/ShengYunHui/TranStatusUpdate", data);

//更改手机号码
export const UpdateMobile = (data) =>
  $http.put("/api/services/app/ShengYunHui/UpdateMobile", data);

//发送更改手机号验证码
export const SendMobileCode = (data) =>
  $http.post("/api/services/app/ShengYunHui/SendMobileCode", data);

//手机验证码登录
export const MobileLogin = (data) =>
  $http.post("/api/services/app/ShengYunHui/MobileLogin", data);

//司机设置车辆
export const TruckSetting = (data) =>
  $http.post("/api/services/app/ShengYunHui/TruckSetting", data);

//司机认证
export const DriverCA = (data) =>
  $http.post("/api/services/app/ShengYunHui/DriverCA", data);

//货主认证
export const ShipperCA = (data) =>
  $http.post("/api/services/app/ShengYunHui/ShipperCA", data);

//创建通话记录
export const CallRecordCreate = (data) =>
  $http.post("/api/services/app/ShengYunHui/CallRecordCreate", data);

//获取通话记录
export const GetCallRecord = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetCallRecord", data);

//获取系统消息
export const GetSysMsg = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetSysMsg", data);

//消息已读
export const ReadMsg = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetReadMsg", data);

//常用路线设置
export const RouteSetting = (data) =>
  $http.post("/api/services/app/ShengYunHui/RouteSetting", data);

//获取常用路线
export const GetCommRoutes = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetCommRoutes", data);

//删除常用路线
export const RouteDelete = (data) =>
  $http.post("/api/services/app/ShengYunHui/RouteDelete", data);

//获取回单列表
export const GetReceiptBills = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetReceiptBills", data);

//创建回单
export const CreateReceiptBill = (data) =>
  $http.post("/api/services/app/ShengYunHui/CreateReceiptBill", data);

//获取回单详情
export const GetReceiptBillDetail = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetReceiptBillDetail", data);

//更改回单状态
export const UptReceiptBillStatus = (data) =>
  $http.post("/api/services/app/ShengYunHui/UptReceiptBillStatus", data);

//微信支付回调通知
export const PushNotify = (data) =>
  $http.post("/api/services/app/ShengYunHui/PushNotify", data);

// 创建交易单
export const CreateTrade = (data) =>
  $http.post("/api/services/app/ShengYunHui/CreateTrade", data);

// 发起微信支付
export const MiniProgramPay = (data) =>
  post("https://pay.syh56.com:44352/api/WeChatPay/MiniProgramPay", data);

// 用户提现
export const UserCash = (data) =>
  $http.post("/api/services/app/ShengYunHui/UserCash", data);

// 获取用户留言记录
export const GetChatRecord = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetChatRecord", data);

// 用户留言
export const CreateChat = (data) =>
  $http.post("/api/services/app/ShengYunHui/CreateChat", data);

//更改报价订金
export const UpdateDepFee = (data) =>
  $http.put("/api/services/app/ShengYunHui/UpdateDepFee", data);

//获取专线列表
export const GetDedLines = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetDedLines", data);

//获取签名
export const CreateSign = (data) =>
  $http.post("/api/services/app/ShengYunHui/CreateSign", data);

//获取物流节点
export const transTimeManageV3 = (data) =>
  $http.post1("/save/apis/transTimeManageV3", data);
  export const routerPath = (data) =>
    $http.post1("/save/apis/routerPath", data);

//司机获取最新货源
export const GetNewShipbill = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetNewShipbill", data);

//司机获取最新货源
export const CreateAudio = (data) =>
  $http.post("/api/services/app/AliyunService/CreateAudio", data);

//创建运动轨迹
export const CreateTransTrack = (data) =>
  $http.post("/api/services/app/ShengYunHui/CreateTransTrack", data);

//获取运输轨迹
export const GetTransTrack = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetTransTrack", data);

//获取距离
export const distance = (data) =>
  get("https://apis.map.qq.com/ws/distance/v1", data);

//个人资料修改
export const UserSimpUpdate = (data) =>
  $http.post("/api/services/app/ShengYunHui/UserSimpUpdate", data);

//服务协议
export const serviceAgreement = (data) =>
  $http.get("/api/services/app/Article/Get", data);

//获取运输位置
export const GetNowPosition = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetNowPosition", data);

//获取播报列表
export const GetPlayQueue = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetPlayQueue", data);

//获取员工
export const GetEmployees = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetEmployees", data);

//创建员工
export const EmployeeCreate = (data) =>
  $http.post("/api/services/app/ShengYunHui/EmployeeCreate", data);

//修改员工
export const EmployeeUpdate = (data) =>
  $http.post("/api/services/app/ShengYunHui/EmployeeUpdate", data);

//删除员工
export const EmployeeDelete = (data) =>
  $http.post("/api/services/app/ShengYunHui/EmployeeDelete", data);

//上传司机位置
export const SetUserLocation = (data) =>
  $http.post("/api/services/app/ShengYunHui/SetUserLocation", data);

//获取附近的司机
export const GetNearDriver = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetNearDriver", data);

//添加车队司机
export const AddDriver = (data) =>
  $http.post("/api/services/app/ShengYunHui/AddDriver", data);
//获取附近的司机
export const GetDrivers = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetDrivers", data);
//微信一键登录
export const BindWeiXin = (code, mobile) =>
  $http.posts(
    "/api/services/app/ShengYunHui/BindWeiXin?code=" +
      code +
      "&mobile=" +
      mobile
  );

//用户消息设置
export const SetUserMsgCfg = (data) =>
  $http.post("/api/services/app/ShengYunHui/SetUserMsgCfg", data);
//获取用户消息设置
export const GetUserMsgCfg = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetUserMsgCfg", data);
//微信登陆获取手机号
export const GetUserPhoneNumber = (data) =>
  $http.get("/api/services/app/Weixin/GetUserPhoneNumber", data);

//微信授权登录
export const GetWeiXinLogin = (data) =>
  $http.get("/api/services/app/ShengYunHui/GetWeiXinLogin", data);
